package com.suneee.refund.dao;

import java.util.List;
import java.util.Map;

import com.suneee.context.page.Page;
import com.suneee.orm.Dao;
import com.suneee.refund.bean.Condition;
import com.suneee.refund.entity.ViewRefundApply;

public interface ViewRefundApplyDao extends Dao<ViewRefundApply, String> {

	/**
	 * 获得分页查询结果
	 * @param condition 查询条件
	 * @param type 退货、退款类型
	 * @return
	 */
	public Page<ViewRefundApply> getPageByCondition(Condition condition, String type);

	/**
	 * 获取分页
	 * @param bean  查询条件
	 * @param feedbackStatus  仓库反馈状态
	 * @return
	 */
	public Page<Map<String,Object>> getNotCheckedList(Condition bean);
	
	/**
	 * 获取分页
	 * @param bean  查询条件
	 * @param feedbackStatus  仓库反馈状态
	 * @return
	 */
	public Page<Map<String,Object>> getCheckedList(Condition bean);

	/**
	 * 根据条件查询退款单
	 * @param condition
	 * @param type
	 * @param processStatus
	 * @return
	 */
	public Page<Map<String,Object>> getNotRefundApplys(Condition condition, String processStatus);

	public Page<Map<String,Object>> getHistoryRefundApplys(Condition condition);
	
	/**
	 * 获得Tid分页查询结果
	 * @param condition 查询条件
	 * @param type 退货、退款类型
	 * @return
	 */
	public Page<Map<String, Object>> getTidPage(Condition condition, String type);
	
	/**
	 * 获得tid有关的所有结果
	 * @param tid 交易单号
	 * @return
	 */
	public List<ViewRefundApply> getViewRefundApplyByTid(String tid, String type,String skuId,String title);
	
	public List<ViewRefundApply> getViewRefundApplyByTidAndSkuId(String refundId);
	
	public List<ViewRefundApply> getViewApplyBytid(String tid, String type,String skuId,String title);
	
	public List<ViewRefundApply> getViewRefundApplyBytidNoRefund(String tid,String afterSaleType,String outSkuId,String title);
	
	/**
	 * 根据条件查询退款单(获取处理的退款单、退货退款单)
	 * @param condition
	 * @param type
	 * @param processStatus
	 * @return
	 */
	public Page<Map<String,Object>> getRefundApplys(Condition condition, String processStatus);
	
	/**
	 * 获得tid有关的所有结果
	 * @param tid 交易单号
	 * @return
	 */
	public List<ViewRefundApply> getNotViewRefundApplyByTid(String tid,String afterSaleType,String outSkuId,String title);
	
	/**
	 * 获得历史售后单
	 * @param tid
	 * @return
	 */
	public List<ViewRefundApply> getHistoryRefundApplyBytid(String tid,String afterSaleType,String outSkuId,String title);
	
	
	/**
	 * 获得已验收的申请
	 * @param tid
	 * @param afterSaleType
	 * @return
	 */
	public List<ViewRefundApply> getViewRefundApplyBytidHasRefund(String tid,String afterSaleType,String outSkuId,String title);
}
